home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-15 / ctest257.zip / COMPTEST.DOC < prev    next >
Text File  |  1992-09-28  |  65KB  |  1,057 lines

  1.      ======================= COMPTEST 2.57 ============================
  2.  
  3.      COMPTEST is a program that determines the system configuration and
  4.      performance characteristics of PC compatible computers. COMPTEST
  5.      was designed to be fast, so most parameters are determined during
  6.      program start up and the first page of results will come up almost
  7.      immediately. Even for slow systems like the original IBM PC the
  8.      first page will be displayed within a few seconds. There are at
  9.      most three pages with results displayed sequentially, with some
  10.      tests occuring only when the appropriate page is displayed.
  11.  
  12.      Usage: COMPTEST [file name] [/D] [/H]
  13.  
  14.      [file name]  is an optional parameter specifying a file in which
  15.                   the results displayed by COMPTEST will be saved on
  16.                   termination of COMPTEST.
  17.  
  18.      /D           is an optional switch enabling additional messages
  19.                   that aid in debugging COMPTEST if the program should
  20.                   crash or fail to correctly determine the system
  21.                   configuration.
  22.  
  23.      /H           is a switch that prints a short help screen for COMPTEST.
  24.  
  25.  
  26.  
  27.      COMPTEST 2.57 is Copyright (c) 1988-1992 by
  28.  
  29.      Norbert Juffa
  30.      Wielandtstr. 14
  31.      7500 Karlsruhe 1
  32.      Germany
  33.  
  34.  
  35.      COMPTEST 2.57 is public domain software and is distributed with full
  36.      assembly language and Turbo Pascal 6.0 source code. You are free to
  37.      incorporate parts of the code into your own programs as long as you
  38.      don't use it in a commercial product.
  39.  
  40.  
  41.      If you want to notify me of bugs you discovered in COMPTEST or want
  42.      to comment on the program in any way, you can either contact me at the
  43.      address above or on Internet as S_JUFFA@IRAVCL.IRA.UKA.DE
  44.  
  45.  
  46.  
  47.      Revision history:
  48.  
  49.  
  50.      Changes since version 2.56:
  51.  
  52. o    COMPTEST 2.56 was compiled with the wrong library. Therefore, benchmark
  53.      results for the floating-point benchmarks (Whetstone, LLL) differ from
  54.      other versions of the program. Sorry about the mistake!
  55.  
  56. o    A correction was added to the determination of coprocessor clock frequency
  57.      in the case a Cyrix 486DLC CPU is present. With a 486DLC present, the
  58.      block of FSQRTs that determines the coprocessor clock frequency is
  59.      executed faster than with the Intel 386DX as CPU, due to the improved
  60.      communication between CPU and coprocessor. The observed speedup is in
  61.      range between 4.7% and 9.7%. For simplicity, COMPTEST 2.57 uses a simple
  62.      correction that divides the computed frequency by 1.055.
  63.  
  64.  
  65.      Changes since version 2.55:
  66.  
  67. o    COMPTEST 2.55 wouldn't detect a Cyrix EMC87 if it was installed and
  68.      reported it as a Cyrix 83D87 instead. This has been fixed.
  69.  
  70. o    Correct detection of the presence and clock frequency of the Cyrix
  71.      486DLC has been tested. Note that presence of a Cyrix 486DLC may
  72.      lead to a higher clock frequency being displayed for a coprocessor,
  73.      if one is installed. Since the 486DLC has an improved handshaking
  74.      with the coprocessor, the block of FSQRT instructions used to measure
  75.      the coprocessor's clock is executed up to 10% faster and the reported
  76.      clock frequency of the coprocessor goes up accordingly.
  77.  
  78.  
  79.      Changes since version 2.54:
  80.  
  81. o    Enhanced POPAD bug detection by testing POPAD execution using 31
  82.      different initial values in the EAX register. Previously, only one
  83.      value was used, which made correct detection of the bug somewhat
  84.      unreliable.
  85.  
  86. o    Detection of the SuperMath 83700DX and 38700SX coprocessors from
  87.      Chips&Technologies have been added and successfully tested. Detection
  88.      for the Intel RapidCAD, Intel 387DX, and Cyrix 387+ has been changed
  89.      from tests depending on instruction timing to tests that rely on
  90.      certain small incompatibilities between the coprocessors.
  91.  
  92. o    When called with a filename to store the results in, COMPTEST would
  93.      fail to print the final message "COMPTEST terminated - press any key"
  94.      if either there was a error in handling the file indicated or if no
  95.      harddisk results were stored. This has been fixed.
  96.  
  97.      ======================================================================
  98.  
  99.      The following is a detailed explanation of the information provided
  100.      by COMPTEST 2.57 and the known limitations of the program.
  101.  
  102.  
  103. o    General limitations:
  104.      Correct execution of COMPTEST depends on certain hardware resources
  105.      provided by the hardware of PC compatibles. That a machine runs MS-DOS
  106.      is by itself no guarantee that COMPTEST can be run successfully, as
  107.      MS-DOS may run on machines that are not 100% compatible with industry
  108.      standard PCs. Since it directly accesses hardware components,
  109.      COMPTEST should not be run in the DOS-boxes supplied by Windows, OS/2
  110.      or similar programs. Even if it does run, some or all of the information
  111.      it provides may be wrong or misleading. For the same reason, it should
  112.      not be run on a PC emulator, e.g. SoftPC by Insignia, even if simpler
  113.      programs like the Landmark Speed Test run succesfully in such an
  114.      environment.
  115.  
  116.  
  117. o    Computer type:
  118.      The specific type of an IBM compatible PC is coded into one or two
  119.      bytes in the last 16 bytes of the first MByte of the address range.
  120.      This memory is occupied by the BIOS ROM. Quiet a few values have
  121.      been defined by IBM for its PC, AT, and PS/2 computers. COMPTEST
  122.      decodes this information according to IBM's definitions and prints
  123.      the result. Ordinary 286, 386, and 486 based PCs with an ISA bus
  124.      are reported as AT compatibles.
  125.  
  126.  
  127. o    CPU Type:
  128.      COMPTEST is able to detect the following CPU types: Intel 8088,
  129.      Intel 8086, NEC V20, NEC V30, Intel 80188, Intel 80186, Intel
  130.      80286, Intel 80386DX, Intel 80386SX, Intel 80486DX, Intel 80486SX,
  131.      Intel RapidCAD, Chips&Technologies 38600DX, Cyrix 486DLC, Cyrix 486SLC.
  132.  
  133.      The Intel 80186/80188 are CPUs with integrated peripherals that
  134.      have been used in only a few PCs that were manufactured around
  135.      1982/1983. It has an extended 8086 instruction set. The Intel
  136.      RapidCAD is a replacement for a 80386/80387 combination and is
  137.      basically a 80486DX without the internal cache and with a 386 pinout.
  138.      The Chips&Technologies 38600DX is a pin compatible replacement for
  139.      the 80386DX CPU that offers some performance improvements. The
  140.      Intel 486SX is a 80486 without the FPU (floating point unit).
  141.      The Cyrix 486DLC is a CPU that is software compatible with the
  142.      486SX, but is a replacement for the 80386DX CPU. Similarly, the
  143.      Cyrix 486SLC is for use in 386SX systems.
  144.  
  145.      AMD's Am386DX, Am38DXL, Am386SX, and Am386SXL are 100% compatible
  146.      to the Intel 386DX and Intel 386SX CPUs, respectively and are
  147.      reported as Intel 386DX and Intel 386SX, respectively by COMPTEST.
  148.      The Intel 486DX2-50, Intel 486DX2-66, and the Intel Overdrive
  149.      processors are 486DX chips that use a clock-doubler that drives
  150.      the CPU internally at twice the speed of the rest of the system.
  151.      The 486DX2-50 is a replacement for the 486DX-25, while the 486DX2-66
  152.      replaces the 486DX-33. The Overdrive goes into the 487SX socket
  153.      found in many 486SX systems. These processors are all reported as
  154.      80486 processors by COMPTEST.
  155.  
  156.      To distinguish between the different CPUs and math coprocessors,
  157.      COMPTEST takes advantage mostly of certain incompatiblities between
  158.      the chips that can be tested without using other system ressources.
  159.      Only a few tests involve timing differences in the execution of
  160.      certain instructions. These depend on the correct operation of the
  161.      PC's timer chip.
  162.  
  163.      To separate the 8086, 8088, V20, V30, 80186, and 80188 CPU from
  164.      newer CPUs, the behavior of the instruction sequence PUSH SP,
  165.      POP AX is used. While after the execution of these instructions,
  166.      AX=SP on the newer processors, AX=SP-2 for the 8086..80188.
  167.  
  168.      To distinguish among the CPUs in the first group (8086..80188),
  169.      the following properties of the processors are used. The 80186/
  170.      80188 (like all newer Intel CPUs) mask off shift counts MOD 32
  171.      in shift and rotate instructions so that no more than 31 shift
  172.      steps are performed. The V20, V30, 8088, and 8008 do not mask off
  173.      shift counts and perform up to the 255 shift steps allowed by the
  174.      8-bit counter used. If a register with a non-zero contents is
  175.      shifted left with a shift count of 32, it will be cleared after
  176.      the operation on the 8086/8088 and V20/V30, while nothing will
  177.      happen on the 80186/80188, since 32 MOD 32 = 0, that is, no shifting
  178.      takes place. V20 and V30 (just like the 80186/80188 and newer CPUs
  179.      from Intel) have a PUSHA instruction that saves all general registers
  180.      on the stack. The 8086/8088 don't have this instruction, but the
  181.      execution of the PUSHA opcode acts like a JMP skipping the next
  182.      code byte. COMPTEST uses this code byte to set a flag so that
  183.      the flag is only set on V20/V30 processors. If the flag is not
  184.      set, an 8086/8086 must be present. This is verified by an additional
  185.      test that checks if the highest nibble in the flag register can be set.
  186.      This nibble is always cleared on the 8086/8088 and can not be set.
  187.  
  188.      The full 16-bit processors 8086, V30, and 80186 can be distinguished
  189.      from the 8088, V20, and 80188 through the use of self modifying code
  190.      that works different due to the different length of the instruction
  191.      prefetch queue which has a length of 4 bytes for the CPUs with 8-bit
  192.      busses, but a length of 6 bytes for the CPUs with 16-bit busses.
  193.      Modifying an instruction five bytes ahead in the instruction stream
  194.      will cause the modified instruction to be used by the 8-bit CPU
  195.      versions, while the original instruction will be executed on the
  196.      16-bit CPU versions, since it was already in the prefetch queue by
  197.      the time the instruction was modified in memory.
  198.  
  199.      To tell apart the 80286 from the 80386 and 80486, an attempt is made
  200.      to change certain bits in the flag register of the CPU. While they can
  201.      be modified in the 80386 and 80486, the 80286 will not allow that to
  202.      be done. The 80486 has a new bit in its flag register that is not defined
  203.      in the 80386 and is always clear there. By attempting to toggle this
  204.      bit, it can be decided wether a 80386 or 80486 is present. The 486SX
  205.      is a 80486 without the FPU (floating point unit ~ integrated coprocessor),
  206.      so if a 486 CPU has been detected but the test for a coprocessor or
  207.      FPU fails, it can be concluded that a 486SX is present. The 80386SX
  208.      has a 16-bit data bus as compared to the 32-bit data bus of the otherwise
  209.      (almost) identical 80386DX, so 32-bit memory accesses on the 80386SX
  210.      are slower than 16-bit memory accesses since they have to be split into
  211.      two 16-bit accesses. On the 386DX, both 16-bit and 32-bit memory
  212.      accesses have the same speed, if memory operands on addresses divisible
  213.      by four are accessed. By measuring and comparing the speed of 16-bit
  214.      and 32-bit memory accesses, COMPTEST determines if a 386SX is present.
  215.      Intel and AMD both make 386DX and 386SX processors that are functionally
  216.      totally identical. However, AMD makes 386DXs that are rated for 40 MHz
  217.      and 386SXs that are rated for 33 Mhz, which Intel doesn't make. So
  218.      COMPTEST could make an educated guess on what manufacturer's CPU is
  219.      used based on the clock frequency it determines. COMPTEST does without
  220.      this guess, though and reports all AMD 386 CPUs as Intel 386DX or Intel
  221.      386SX.
  222.  
  223.      Chips and Technologies has introduced CPUs that are compatible with
  224.      the 386DX and 386SX, which are called the 83600DX and 83600SX. Also,
  225.      an 83600DX with a small internal cache has been announced called the
  226.      83605DX. While AMD uses Intel's microcode in their 386 CPUs, C&T uses
  227.      its own microcode. Therefor, the CPUs from C&T do not possess a well
  228.      known bug present in the Intel 80386. This so called POPAD bug causes
  229.      the EAX register to be trashed for a certain instruction sequence
  230.      involving the POPAD instruction. COMPTEST checks for this bug to
  231.      distinguish the C&T CPUs from Intel's 386 processors. Since I have
  232.      found that the POPAD bug can not be reliably reproduced on Intel 386SX
  233.      CPUs, COMPTEST reports all 386SX CPUs as Intel 386SX, whether a POPAD
  234.      failure occurs or not. Since C&T will not offer the 38600SX before
  235.      late in 1993, this doesn't make the CPU detection by COMPTEST less
  236.      reliable. COMPTEST will not recognize the 83605DX, but will report
  237.      it as a 83600DX. Since the reproducability of the POPAD bug depends
  238.      somewhat on the initial value in the EAX register, COMPTEST uses 31
  239.      different values.
  240.  
  241.      The Intel RapidCAD is basically a 486 without the internal cache
  242.      that is an enduser replacement for a 80386DX/80387 combination.
  243.      It is 100% software compatible with this combination and can be
  244.      detected by checking the speed of store operations from the FPU
  245.      to memory, which are executed much faster on the RapidCAD than in
  246.      any 386/387 system, regardless of the coprocessor used.
  247.  
  248.      Cyrix now offers the 486DLC and the 486SLC that are designed for
  249.      386/386SX systems. However, they are software compatible with the
  250.      Intel 486SX. Cyrix has implemented a fast array multiplier on these
  251.      chips to speed up integer multiplications, making the MUL instruction
  252.      faster than on any other CPU found in PC comaptible computers.
  253.      COMPTEST compares the speed of the MUL instruction to that of the
  254.      AAM instruction to determine if a Cyrix 486DLC/486SLC is present.
  255.      While on most 80x86 compatibles, AAM has an execution time close
  256.      to the execution time of the MUL instruction, the MUL instruction
  257.      executes at about three times the speed of an AAM in the Cyrix486.
  258.  
  259.  
  260. o    Clock frequency:
  261.      Measuring the clock frequency of the CPU is based on repeated execution
  262.      of the AAM (ASCII adjust after multipy) instruction. This instruction
  263.      takes more than 10 clock cycles to execute on all CPUs that are supported,
  264.      so there is enough time for the CPU to always keep its prefetch queue
  265.      filled, resulting in very stable timings since there is no addtional
  266.      penalty for filling up the prefetch queue. Also the AAM instruction has
  267.      the advantage to execute in a fixed number of clock cycles, as opposed
  268.      to some instructions like DIV that take even longer to execute than AAM,
  269.      but whose timing depends on the input arguments. To report the clock
  270.      frequency accurately, it is absolutely important to use the correct
  271.      execution time for the AAM instruction in COMPTEST. Note that the AAM
  272.      execution time stated in the Intel manual for the 8088/8086 is not
  273.      correct. Depending on the accuracy of the oscillator that drives the
  274.      PCs timer, clock frequency should be accurate to within +/- 2%. Note
  275.      that for CPUs that use internal clock doubler circuits (e.g. Intel
  276.      486DX2-50), the clock frequency displayed by COMPTEST is the frequency
  277.      at which the CPU runs internally (50 MHz in the example cited).
  278.  
  279.  
  280. o    Bus width:
  281.      The width of the CPU data bus. This is determined by the type of the
  282.      CPU, so this is actually redundant information.
  283.  
  284.  
  285. o    Cache size:
  286.      COMPTEST is one of very few test programs that correctly determines
  287.      the cache size of first and second level caches. This is very useful
  288.      if you are not sure wether the CPU cache in your computer is enabled
  289.      or functional at all. COMPTEST moves memory blocks of increasing size
  290.      and watches for sharp drops in memory thruput to determine the cache
  291.      sizes. Since the largest blocks tested have a size of 512 kB, COMPTEST
  292.      is limited in that it can *not* correctly detect caches that are
  293.      bigger than 256 kB. The smallest cache size COMPTEST can determine
  294.      is 1 kB, which is the size of the internal cache on the Cyrix 486SLC
  295.      and 486DLC chips. COMPTEST's cache test strategy may be defeated if
  296.      you have defined non-cacheable areas in the first 512 kB of base memory.
  297.      Non-cacheable areas can usually be defined in the extended BIOS setups
  298.      of 386 and 486 based machines and are only necessary if you have a
  299.      write-back cache and have to ensure correct operation of memory mapped
  300.      peripherals (e.g. video memory of graphics card, Weitek coprocessor).
  301.      Usually there is no need to define a non-cacheable area in the first
  302.      512 kB of base memory. COMPTEST's cache detection usually is very
  303.      reliable, only once did it indicate a cache on a system with no CPU
  304.      cache, probably due to the mixture of page/interleave access modes
  305.      used by that system's memory. The technique used by COMPTEST to
  306.      determine cache size basically works as follows: Assume you have a
  307.      machine with a n kB CPU cache. If you read a memory block of n kB or
  308.      less twice, it will be read almost completely from the cache the
  309.      second time it is read (some data may have been thrown out by accesses
  310.      to the test code). However, if you linearly read a block of 2n kB
  311.      data twice, the second half of the data block will throw out the first
  312.      half of the data block that is already in the cache. On the second
  313.      pass thru, accesses to the first half of the block will result in
  314.      a miss for every cache line accesssed, as the cache now contains the
  315.      data from the first n kBytes of the block. If the times to read data
  316.      blocks of 2^i kBytes are recorded, one sees a sharp increase in read
  317.      time as soon as a data block larger than the cache size is read.
  318.  
  319.  
  320. o    Maximum RAM thruput (without cache):
  321.      This is a measure of the quality of the main memory system of the
  322.      machine tested. As with all thruput numbers, higher numbers are
  323.      better. Maximum thruput is determined by executing block move
  324.      instructions moving blocks on even addresses. For processors up to
  325.      and including the 80286, 16 bit transfers are used to move the data.
  326.      For the 80386 and newer processors, 32 bit transfers are used to
  327.      correctly reflect the higher memory thruput that is possible using
  328.      instructions that can handle 32 bit data. By moving memory blocks
  329.      that are bigger than CPU caches that may be present, COMPTEST tries
  330.      to defeat the cache strategy and to measure the true speed of system
  331.      RAM as if no cache(s) are present. However, this technique can back-
  332.      fire so the values given by COMPTEST for RAM thruput without cache
  333.      may be different from those that COMPTEST determines if the cache(s)
  334.      are physically disabled (usually possible thru the BIOS setup). The
  335.      value reported by COMPTEST for RAM thruput without cache is really
  336.      the memory thruput with the maximum possible number of cache misses.
  337.      With a decent cache controller, the memory access speed in case of
  338.      a cache miss is the same as if no cache were present at all. However
  339.      some cache controllers impose an additional overhead on such a memory
  340.      access that may be as large as 40 clock cycles per cache line loaded,
  341.      as opposed to 3-4 clocks for a good cache controller. In these cases,
  342.      COMPTEST reports up to 6 wait states or even more for RAM access
  343.      without cache. Even if COMPTEST does not report the correct value
  344.      for the RAM thruput in these cases, it is still a valuable indicator
  345.      of the quality of the cache/memory subsystem implementation. The
  346.      higher the thruput reported the better does the system perform. On
  347.      systems with no CPU cache, COMPTEST reliably measures the true thruput
  348.      of the system RAM. Based on the measured thruput as compared to
  349.      the maximum thruput for the detected CPU, COMPTEST also computes
  350.      the equivalent number of wait states. This is not an integral number
  351.      due to the fact that the number of waitstates is usually not the
  352.      same for every memory access. COMPTEST reports the *average* number
  353.      of wait states needed. With wait states, lower numbers are better.
  354.      Older 80286 based systems going faster than 10 MHz usually have at
  355.      least 0.6-0.7 wait states but on a recently tested 80286 system running
  356.      at 16 MHz, COMPTEST reported 0.1 wait states, which reflects the state
  357.      of the art in memory system design. 80386DX and 80486 based systems
  358.      typically have no less than 1.6 wait states. A brandnew 386SX system
  359.      based on the Am386SX-33 had only 0.3 wait states, though. There are
  360.      machines that use fast SRAM for the 640 kB base memory that doesn't
  361.      force the CPU to insert wait states when accessing this memory. The
  362.      RAM thruput measured by COMPTEST refers only to the up to 640 kB of
  363.      base memory.
  364.  
  365.  
  366. o    Cache Thruput:
  367.      This information is only reported if COMPTEST has found a CPU cache
  368.      in the machine. As with memory thruput, higher numbers are better.
  369.      Cache thruput is determined by performing block moves on even addresses
  370.      within the cache memory using the CPU's MOVS instruction with the
  371.      maximum data width available. If two levels of cache are present in
  372.      the system (e.g. a 80486 system with an external cache of 256 kB and
  373.      the 8 kB of internal cache in the 80486), the thruput for both is
  374.      reported. You will see a performance drop going down the memory
  375.      hierarchy. First level caches usually run with no wait states, that
  376.      is with the full speed supported by the CPU. The second level cache
  377.      has less thruput than the first level cache, but is several times
  378.      larger. The system memory is even slower than the second level cache
  379.      but much bigger. The cache thruput rates reported by COMPTEST usually
  380.      areaccurate indicators of the cache performance. Write-back caches
  381.      may have higher thruput rates reported than write-thru caches, as the
  382.      block move performs reads and writes. However, write-thru caches
  383.      also show higher performance when used with real applications, so
  384.      the higher performance indicated by COMPTEST is probably justified.
  385.  
  386.  
  387. o    System memory:
  388.      System memory here refers to the base memory within the first megabyte
  389.      of the address space and below the start of a graphics adapter's
  390.      display memory. COMPTEST searches for RAM in small steps from the
  391.      bottom to the top of the address space until it reaches a graphics
  392.      adapter or no more contiguous RAM is found. Note that this value
  393.      can be larger than the usual 640 kB. For example, on systems with
  394.      only a CGA, system memory could be expanded up to address B8000h
  395.      for a total of 736 kByes of system memory. Similarly, system memory
  396.      could be expanded to 704 kBytes on a system using a monochrome
  397.      Hercules card. There are special memory cards that allow such extensions.
  398.      Also, utilities such as the VIDRAM program included with Quarterdeck's
  399.      QEMM memory manager can expand the base memory by either using part
  400.      of a VGA's or EGA's display memory as system memory or mapping
  401.      extended memory into this range, and disabling part of the EGA/VGA's
  402.      capabilities to make basically a CGA out of them.
  403.  
  404.  
  405. o    Memory available to DOS:
  406.      This is the amount of system memory (base memory) that the BIOS
  407.      reports to DOS. The BIOS determines the amount of system memory
  408.      during a cold boot and stores the result in its data block which
  409.      starts at address 400h. Several utility programs that extend the
  410.      system memory above 640 kB, such as the VIDRAM program that comes
  411.      with Quarterdeck's QEMM memory manager, manipulate this value to
  412.      reflect the greater amount of memory now available to DOS. Note
  413.      that the value reported by COMPTEST does not include DOS memory
  414.      in UMBs created by MS-DOS 5.0 or similar programs. This test is
  415.      a bit out of date and could be updated to support the new features
  416.      of the latest DOS versions.
  417.  
  418.  
  419. o    Memory permanently used by DOS and TSR's:
  420.      As the previous test, this one is outdated in that it doesn't take
  421.      into consideraton the state of the art with regard to DOS memory
  422.      management. All memory below the address at which COMPTEST is loaded
  423.      is assumed to be unavailable to DOS. Device drivers and TSRs that are
  424.      loaded high are not included into the amount of memory reported. Use
  425.      the program MEMMAP also included in the COMPTEST archive file to get
  426.      a detailed list of DOS memory allocation.
  427.  
  428.  
  429. o    Extended memory (INT 15h thruput):
  430.      Extended memory is that part of a PC's memory that is above the
  431.      first megabyte of the CPU's address space. It can be available only
  432.      on those computers that have an 80286 or newer CPU. Except for the
  433.      first 64 kB block of extended memory, which is called HMA (high
  434.      memory area), it can only be accessed in the protected mode of
  435.      these processors. COMPTEST reports the amount of extended memory
  436.      as determined by the system BIOS during a cold boot. This value is
  437.      stored in the CMOS RAM of the real time clock of AT type machines.
  438.      On newer PCs, this CMOS has been physically incorporated into the
  439.      chip set that contains most of the discrete logic of older PCs in
  440.      two or three chips. COMPTEST reads the amount of extended memory
  441.      directly from the CMOS RAM. Note that the sum of base memory
  442.      and extended memory may not add up to the total memory installed
  443.      in the machine, as some of this memory may be used to shadow the
  444.      BIOS ROM and/or ROM extensions (e.g. VGA BIOS) and is therefore
  445.      unavailable for other purposes. Shadowing means that the code in
  446.      the ROMs is copied to RAM during a cold boot and that this RAM is
  447.      mapped to the same address as the shadowed ROM. Since ROMs are slow,
  448.      code in the ROMs (e.g. BIOS) executes slowly and can be sped up a
  449.      lot by shadowing. Extended memory can be accessed in several ways.
  450.      One way is to use the services of a XMS (extended memory specification)
  451.      driver such as HIMEM.SYS. This, however, requires such a driver to
  452.      be loaded. There are also functions provided by the BIOS via INT 15h
  453.      to access extended memory. COMPTEST uses these to copy a block of
  454.      memory from extended memory to the base memory below 640 kB and
  455.      determines the transfer rate (thruput) by maesuring the time it takes
  456.      to copy the block. Using a memory manager such as QEMM usually causes
  457.      the INT 15h functions to be mapped to the appropriate XMS calls, so
  458.      the INT 15h thruput value may differ significantly depending on
  459.      wether a memory manager is loaded or not. Not all BIOSes use 32-bit
  460.      transfers for block copies from/to extended memory when it is
  461.      possible (that is, on 386 and 486 based machines), so the INT 15h
  462.      thruput from extended memory may be only half of the normal system
  463.      memory thruput. Also, access to extended memory usually requires the
  464.      CPU to be switched to protected mode and back, which causes considerable
  465.      overhead when it is not done via the fast methods provided by most
  466.      386 and 486 chip sets, but uses the traditional method which involves
  467.      the keyborad controller.
  468.  
  469.  
  470. o    Expanded Memory:
  471.      Expanded Memory, specified in the EMS (expanded memory specification),
  472.      was originally designed to provide 8086 and 8088 based computers, which
  473.      have only a one MByte address space, with up to 32 MBytes of memory.
  474.      The LIM (Lotus,Intel,Microsoft)-EMS is a standardized application
  475.      interface that permits several implementation techniques. Memory cards
  476.      which support expanded memory in hardware use sort of a bank switching
  477.      technique. Up to four blocks of 16 kBytes each can be mapped into a
  478.      contigous 64 kB region in the address range C8000h-E0000h. This region
  479.      is called the EMS page frame. The memory on such EMS cards can not be
  480.      accessed as fast as the system memory on the motherboard in most
  481.      computers, since the data has to travel over the relatively slow ISA
  482.      bus. On the 386 and 486 based computers mostly used nowadays, expanded
  483.      memory is usually provided by a memory manager like 386MAX, QEMM, or
  484.      EMM386 that manages part of the extended memory (memory above the first
  485.      MByte of the address space) as expanded memory. These programs use the
  486.      MMU (memory managment unit) built into these CPUs to map memory blocks
  487.      from the extended memory to the EMS page frame. There are also programs
  488.      that use the hard disk to provide the storage for expanded memory.
  489.  
  490.      COMPTEST tries to detect a EMS driver in the system. If it finds one,
  491.      it will question the driver for the total EMS memory provided by it,
  492.      the start address of the EMS page frame and the EMS version number with
  493.      which the EMS driver complies. The current version of EMS is 4.0, which
  494.      defines additional services over the previous version 3.2. COMPTEST does
  495.      not detect a memory card with hardware support for EMS if the EMS driver
  496.      for the card has not been loaded. COMPTEST determines the thruput from
  497.      EMS memory by reserving a EMS-page, mapping it into the page frame and
  498.      doing a block copy from the mapped-in page.
  499.  
  500.      Note that the total amount of memory available to programs that can
  501.      make use of expanded and extended memory may well be lower than the
  502.      sum of the extended memory and the expanded memory, as some of the
  503.      extended memory physically present in the machine and reported by
  504.      COMPTEST may have been logically converted to EMS memory by an EMS
  505.      driver.
  506.  
  507. o    other RAM:
  508.      COMPTEST tries to find additional RAM between the end of the graphics
  509.      card's display memory and the start of the BIOS ROM. This RAM may be
  510.      provided by special memory cards or by some chips sets like NEAT that
  511.      can map memory to this region physically. It can also be provided by
  512.      386 memory managers, that use the processor's MMU (memory managment unit)
  513.      to logically map memory to this region. The latest DOS versions (e.g.
  514.      MS-DOS 5.0) can use such memory in the form of UMBs (upper memory
  515.      blocks). COMPTEST may also find RAM that is present on network adapters
  516.      or certain hard disk controllers. In such cases, COMPTEST may report
  517.      numerous very short RAM blocks. If the length of these blocks is below
  518.      one kByte, COMPTEST prints the size as 0 kB. The memory found on network
  519.      adapters and hard disk controllers is of course not available to DOS.
  520.      Rather, these adapters use the RAM for buffers or to hold certain
  521.      variables. COMPTEST does not scan the address space above the display
  522.      memory byte by byte to find RAM. Rather it tests every 256th byte if
  523.      it is in RAM. The byte is tested by writing two different values to
  524.      it and checking if both can be reliably read back.
  525.  
  526.  
  527. o    BIOS-extensions:
  528.      COMPTEST searches for BIOS-extensions such as a VGA-BIOS or hard disk
  529.      BIOS between the end of the graphic adapter's display memory and the
  530.      start of the main BIOS-ROM. In steps of 256 bytes COMPTEST checks if
  531.      the next two bytes read 55h, AAh, which is the common ID with which
  532.      all BIOS extensions start. If the sequence 55h, AAh is found, COMPTEST
  533.      reads the next byte, which stores the length of the BIOS-ROM measured
  534.      in 0.5 kByte blocks, if a BIOS-extension is indeed present. All bytes
  535.      in the memory region specified by the length byte are summed up. If
  536.      the 8 lowest bits of the sum are found to be all zero, a valid BIOS
  537.      extension has been found. COMPTEST then tries to determine if the BIOS
  538.      extension found is a hard disk BIOS or an EGA/VGA BIOS and displays
  539.      that additional information where applicable. Note that the same block
  540.      of memory can be displayed as both, a BIOS extension and extra RAM.
  541.      This usually indicates that BIOS shadowing is being used and that
  542.      the shadowed BIOS has not been write protected.
  543.  
  544.  
  545. o    parallel ports:
  546.      COMPTEST prints the number of parallel ports as reported in the
  547.      BIOS's equipment byte.
  548.  
  549.  
  550. o    serial ports:
  551.      PCs are commonly prepared to manage up to four serial ports in the
  552.      system. The BIOS checks for serial ports installed during a cold
  553.      boot and stores the number of serial ports found in the BIOS' data
  554.      area (starting at address 400h). It also determines the start address
  555.      for the block of IO-ports each serial port occupies. COMPTEST evaluates
  556.      this information. It also tests for serial ports (UARTs = universal
  557.      asynchronous receiver transmitter) itself, searching the four
  558.      standardized IO starting addresses used in PCs (3F8h, 2F8h, 3E8h, 2E8h).
  559.      First it tries to establish wether a UART is present at the specified
  560.      address by trying to switch on the loopback feature of the UART and
  561.      then transferring a byte thru the loop. If this test passes, COMPTEST
  562.      assumes that a UART is present, since it is highly unlikely that any
  563.      other device would correspond to the same sequence of intructions in
  564.      the same manner. COMPTEST then tries to find out wether the UART chip
  565.      used is a 8250, 16450, 16550, or 16550A. The 8250 is the UART chip used
  566.      in PC compatibles. The 16450 is the successor to the 8250 chip. It
  567.      supports transfers at higher baud rates than the 8250. It also features
  568.      a scratch register that the 8250 does not have. By trying to store
  569.      values in the scratch register and read them back, COMPTEST determines
  570.      wether a 8250 or 16450 is in the system. The 82450 is the same chip
  571.      as the 16450 produced by a different manufacturer and is reported as
  572.      a 16450 by COMPTEST. The 16550 is a 16450 with added send and receive
  573.      FIFO buffers. This makes for more reliable communication and higher
  574.      effective transfer rates in interrupt driven serial communication. The
  575.      original 16550 had a bug that was fixed in the 16550A. The 16550 has
  576.      two status bits that reflect the status of the send/receive FIFOs. On
  577.      the 16550 only one of these bits works correctly, while on the 16550A,
  578.      both of them perfrom as expected. This is used by COMPTEST to distinguish
  579.      between the two chips.
  580.  
  581.  
  582. o    mathematical coprocessor:
  583.      COMPTEST checks if a 80x87 mathematical coprocessor is present. If
  584.      one is found, it does a detailed check on the type of coprocessor
  585.      installed. It can determine the presence of the Intel 8087, Intel
  586.      80187, Intel 80287, Intel 287XL, Intel 80387, Intel 387DX, Intel
  587.      387SX, Intel RapidCAD, Cyrix 82S87, Cyrix 83S87, Cyrix 83D87, Cyrix
  588.      387+, Cyrix EMC87, IIT 2C87, IIT 3C87, IIT 3C87SX, ULSI 83S87, ULSI
  589.      83C87, C&T 38700DX, C&T 38700SX and coprocessor emulators using INT 7
  590.      for emulation. The Cyrix EMC87 is a 387DX compatible coprocessor that
  591.      also provides a memory mapped mode and goes into the EMC socket found
  592.      in most 386 based machine that was originally designed for the Weitek
  593.      coprocessors. Correct detection of most, but not all, of the chips
  594.      mentioned has been tested. COMPTEST also tries to determine the presence
  595.      of a Weitek Abacus 3167 or 4167 coprocessor by checking the BIOS'
  596.      equipment status for a set Weitek bit. However, on most systems, this
  597.      bit is only set if the Weitek coprocessor has been registered in the
  598.      BIOS extended setup by the user, so it is not very reliable. COMPTEST
  599.      does not check for physical presence of a Weitek coprocessor.
  600.  
  601.      COMPTEST takes advantage of the fact that 80x87 coprocessor instructions
  602.      are ignored in systems with no coprocessor. It executes instructions
  603.      that store the default status and control words of a coprocessor to
  604.      memory. If no coprocessor is present, nothing gets stored in these
  605.      memory locations. If the expected values are stored in these locations
  606.      COMPTEST knows that a coprocessor is present.
  607.  
  608.      If a coprocessor has been found, COMPTEST tries to detect into which
  609.      of the following four groups it belongs: emulator via INT 7, 80486,
  610.      8087/80287, all other coprocessors. If the emulation bit in the
  611.      machine status word of a 286 or 386 CPU is set, COMPTEST assumes that
  612.      the 'coprocessor' found is actually an emulator that emulates coprocessor
  613.      instructions via the INT 7 trap. If the CPU was found to be an Intel
  614.      80486, COMPTEST knows that the coprocessor found is the FPU on this
  615.      chip. The Intel 8087 and 80287 were designed before the IEEE-754 Standard
  616.      for Binary Floating-Point Arithmetic was finally accepted in 1985. As
  617.      opposed to all newer coprocessors, they implemented certain features
  618.      no longer supported in the final form of the standard. One of these
  619.      features was that they had two modes for handling infinities. In one
  620.      mode, infinities were signed, in the other, all infinities did not
  621.      carry a sign and were the same. COMPTEST uses this to separate the 8087
  622.      and 80287 from other coprocessors. It generates an infinity by means
  623.      of a division by zero, duplicates that infinity, changes the sign of
  624.      the infinity and then compared the two values. On the 8087 and 80287,
  625.      they will be reported to be identical, while on all other coprocessors,
  626.      the are reported as different due to the different sign. This enables
  627.      COMPTEST to distinguish the Intel 80287 from the 287XL and coprocessors
  628.      compatible with the latter, such as Cyrix 82S87 and IIT 2C87. It also
  629.      makes it possible to find out wether a 386 based system uses the 287
  630.      or a 387 as the coprocessor.
  631.  
  632.      The 287 and 387 compatible coprocessors from different manufacturers
  633.      can be told apart by certain incompatiblities:
  634.      The IIT coprocessors do not support denormal numbers in the coprocessor's
  635.      internal format, while all other coprocessors do. COMPTEST tests for
  636.      the IIT coprocessors by loading an extended precision denormal and
  637.      adding that number to itself. On all coprocessors except the ones
  638.      from IIT, this causes the denormal exception to be raised. Since the
  639.      result is flushed to zero on the IIT coproessors, the denormal exception
  640.      is not raised.
  641.      The ULSI coprocessors do not support the rounding control feature of
  642.      the other coprocessors. They compute all results in extended precision.
  643.      To test for ULSI coprocessors, COMPTEST sets the precision control
  644.      to 53 bits and then multiplies two numbers whose product can be
  645.      represented exactly in the 64 mantissa bits of the extended precision
  646.      format, but not in 53 mantissa bits. Therefore, the precision exception
  647.      is raised on all coprocessors except the the ones from ULSI.
  648.      In the Cyrix coproessors, several small bugs present in the Intel
  649.      coprocessors have been fixed. One of them deals with the operation
  650.      on NaNs. Intel's requirements state that an instruction that operates
  651.      on two NaNs should return the larger of the two NaNs. However, if both
  652.      NaNs have the same absolute value but different sign, Intel's coprocessors
  653.      erroneously return the negative (and therefore smaller) NaN. The Cyrix
  654.      coprocessors return the correct result in these cases. COMPTEST uses
  655.      the FPATAN instruction to perform the test described. The successor
  656.      to the 83D87 from Cyrix is the 387+. This is a "Europe-only" name, in
  657.      other parts of the world, the new coprocessor is sold under the old
  658.      name 83D87. The 387+ can be told apart from the 83D87 because of its
  659.      extended argument range for the FYL2XP1 instruction. While the range
  660.      for this instruction is restricted to -sqrt(2)/2..sqrt(2)/2 on all
  661.      other 80x87 compatibles, it is unrestricted in the 387+. COMPTEST
  662.      computes FYL2XP1 (1.0) and tests if the correct result (1.0) is returned.
  663.      The Cyrix EMC87 can be told apart from other Cyrix coprocessors since
  664.      the most significant bit of its control word can be written.
  665.      The Intel 80387 exists in two versions. The newer one is called 387DX
  666.      and provides about 20% more performance. One difference between these
  667.      chips is what they get for the exponent when doing an FXTRACT of -1.0.
  668.      While the older 80387 gets -0.0 as the answer, the newer 387DX gets
  669.      +0.0. This difference is used by COMPTEST to decide which Intel 80387
  670.      is in the machine.
  671.      The coprocessors from Chips and Technologies are detected by the result
  672.      they return for F2XM1 (pi). Note that F2XM1 is only defined for arguments
  673.      in the interval -1..1. The C&T 38700 coprocessor returns pi/2 when F2XM1
  674.      is called with an argument of pi. The Cyrix coprocessors return the same
  675.      result, but are never submitted to the test for the C&T coprocessors.
  676.      The Intel RapidCAD behaves like a 386/387 combination. One of the few
  677.      differences is the way in which the value BCD INDEFINITE is stored.
  678.      While the Intel 80387 and 387DX store it as FFFF 8000000000000000, the
  679.      RapidCAD and the Intel 80486 store it as FFFF C000000000000000. This
  680.      difference is used by COMPTEST to detect the RapidCAD chip.
  681.  
  682.      COMPTEST measures the clock speed of the coprocessor by measuring the
  683.      time it takes to execute a block of FSQRT instructions. This instruction
  684.      was picked since it has a very stable execution time that varies
  685.      only minimally and has a sufficiently high execution time. However,
  686.      the execution time of coprocessor instructions in 286 and 386 systems
  687.      may vary by a few clock cycles, depending on the chip set used. Also,
  688.      in some systems, the CPU and the coprocessor run asynchronously, causing
  689.      the execution time of coprocessor instructions even more, since in
  690.      286 and 386 systems the CPU has to fetch the instructions and operands
  691.      for the coprocessor.
  692.  
  693.  
  694. o    mouse:
  695.      COMPTEST tries to detect the presence of a mouse driver, not if a
  696.      mouse if physically hooked up to the PC. It calls a specific mouse
  697.      driver function that returns the information on which button has
  698.      been pressed. This has the advantage that the mouse driver's status
  699.      is not changed.
  700.  
  701.  
  702. o    games adaptor:
  703.      COMPTEST tries to determine the presence of a games adapter (used
  704.      to hook up up to two analog joysticks to the PC). This test has two
  705.      stages: In the first stage COMPTEST asks the BIOS if a games adapter
  706.      is present, in the second stage it tries to access the games adapters
  707.      registers. Unfortunately, both methods seem to be highly unreliable,
  708.      as COMPTEST usually reports that no games adaptor could be found,
  709.      even if one is installed.
  710.  
  711.  
  712. o    DOS drives:
  713.      COMPTEST determines the number of DOS drives by trying to set the
  714.      default drive to DOS drives 0 to 8, and returns all those drives
  715.      as valid DOS drives that can be used as DOS default drive. Note
  716.      that this limits the number of DOS drives that COMPTEST recognizes
  717.      to a maximum of nine drives. This can easily be expanded by some
  718.      changes to the source code.
  719.  
  720. o    floppy drives:
  721.      COMPTEST reports the number of floppy drives as reported in the BIOS
  722.      equipment flag. In AT compatible systems, the type of each floppy
  723.      drive is taken from the drive information found in the CMOS RAM in
  724.      the real time clock. In modern system, this RAM is now part of the
  725.      system's chip set.
  726.  
  727.  
  728. o    hard disks:
  729.      COMPTEST recognizes up to four hard disks. For each drive, it calls
  730.      the 'drive ready' status function of the BIOS. Every drive that
  731.      returns the 'ready' condition is included into the final tally.
  732.      Some removable hard disks, such as Tandon's data packs, that require
  733.      special drivers to hook into the DOS file system, are not recognized
  734.      as hard disks by COMPTEST.
  735.  
  736.  
  737. o    graphics card:
  738.      COMPTEST reports only one graphics card in the system, even if two
  739.      are installed (e.g. EGA and Hercules). It recognizes MDA and CGA
  740.      (found in the original IBM-PC), EGA (introduced with the IBM-AT),
  741.      MCGA and VGA (introduced with IBM's PS/2), also the monochrome
  742.      Hercules card and IBM's PGA. No attempt is made to distinguish
  743.      between the many different chip sets used in todays VGAs (e.g.
  744.      TVGA, Tseng ET4000, Video 7). COMPTEST will also not recogize the
  745.      Hercules RAMFont and Hercules InColor cards, 8514/A, Tiga cards or
  746.      other accelerated graphics cards. COMPTEST detects most of the
  747.      graphics cards it recognizes by making call's to certain functions
  748.      in their BIOS. For EGA cards, it also reports the amount of memory
  749.      on the adapter as reported by the EGA-BIOS.
  750.  
  751.  
  752. o    Video-RAM wait states:
  753.      The CPU usually can not access the display memory on a graphics card
  754.      at full speed due to a number of reasons. As the CRT controller on the
  755.      graphics adapter has to read out the display memory to generate the
  756.      CRT signals and the DRAM found on most graphics cards does not allow
  757.      simultaneous access from the CPU and the CRT controller, the CPU may
  758.      have to wait until the CRT controller has finished its access to a
  759.      particular part of display memory. Second, data transferred to/from
  760.      a graphics card has to travel over the PCs system bus, which has a
  761.      limited thruput that is much smaller than the memory bandwidth of the
  762.      CPU, thus slowing down the average memory access over the bus. The
  763.      ISA bus found in most PCs is particulary slow, while the MCA and
  764.      EISA busses provide more bandwidth. To overcome this problem, some
  765.      manufacturers have chosen to integrate the graphics adapter on the
  766.      mother board or couple the graphics adapter more closely to the CPU
  767.      using a technique called local bus. Third, for fast machines, the
  768.      speed of the RAM chips on the graphics card (60-70 ns at best) is
  769.      to slow to allow zero wait state operation of video memory accesses.
  770.      This is the same problem that affects memory accesses to the system
  771.      RAM in these machines. Fourth, the bus interface used by the graphic
  772.      card's chip set may introduce additional slow down due to the physical
  773.      organization of the display memory (e.g. remapping word accesses to
  774.      byte accesses). End users can influence the raw video thruput (and
  775.      thereby the number of wait states) by selecting a graphics card with
  776.      a fast chip set and by configuring their system to use as high a bus
  777.      speed as possible. Typical numbers for video-RAM wait states are
  778.      1 wait state per MHz CPU clock frequency for Hercules cards, ~15
  779.      wait states for EGA cards, and as low as 7 wait states for fast
  780.      VGA cards (e.g. those using the ET4000 chip set). Note that on
  781.      486-DX2 system, the number of wait states is usually higher since
  782.      the whole system runs at half the speed of the CPU. To measure
  783.      wait states for video-RAM accesses, COMPTEST stores a block of
  784.      data to the video adapter and measures the time to do that. This
  785.      time is then compared to the time it would take to store this
  786.      data in zero wait state memory. From these values the number of
  787.      wait states is computed. COMPTEST uses the memory at address
  788.      B0000h for monochrome modes and B8000h for color modes for this
  789.      test. On some graphics cards, the memory access at these addresses
  790.      may have a higher number of wait states than in other parts of the
  791.      screen memory (e.g. the memory at A0000h used by high resolution
  792.      graphics modes of EGA/VGA cards). There is also a PD program
  793.      called VIDSPEED that uses a technique similar to COMPTEST's to
  794.      report video-RAM thruput and vertical and horizontal retrace
  795.      frequencies.
  796.  
  797.  
  798. o    Speed of video output via BIOS:
  799.      The speed is given in characters output per second as measured for
  800.      function #9 of the video BIOS (write character with attribute). Note
  801.      that there are other video-BIOS functions that write characters
  802.      to the screen, that may be faster or slower than the function to
  803.      be choosen for COMPTEST. For these reasons, it is hard to compare
  804.      the output speed determined by COMPTEST with other system diagnostic
  805.      programs such as DiagSoft's PowerMeter. As this test heavily exercises
  806.      code in the video-BIOS, there may be huge performance differences
  807.      between a shadowed and a non-shadowed BIOS. BIOS shadowing means
  808.      that the BIOS code is copied from slow ROMs to fast RAM for faster
  809.      execution at system start up. This is an option in most 286/386/486
  810.      based systems that operate at more than 10 MHz. BIOS thruput drops
  811.      due to the use of the 386 memory managers, since these programs
  812.      intercept all interrupts and therfore introduce a consuderable
  813.      overhead into the execution of BIOS interrupts. There may also be
  814.      TSR's that hook the video BIOS interrupt and cause BIOS thruput to
  815.      drop even further. The typical BIOS thruput in fast 386 and 486
  816.      systems usually exceedss 100,000 characters per second. Due to the
  817.      trend to GUIs (graphical user interfaces), the output speed of the
  818.      BIOS has lost its earlier importance. Most programs do not even
  819.      use the BIOS for character based output, but rather write to the
  820.      screen directly. Note that scrolling may reduce the output speed
  821.      significantly and is not included in the BIOS thruput test by
  822.      COMPTEST.
  823.  
  824.  
  825. o    Speed of video output via DOS:
  826.      The speed is given in characters output per second as measured for
  827.      the DOS functions #9 (print string). Note that the DOS file functions
  828.      can also be used to print to the screen and that the output speed
  829.      for these function may differ from the output speed reported. Also,
  830.      the output speed may depend on the string length of the string to
  831.      be printed due to varying amount of overhead while calling DOS. Since
  832.      an ANSI driver usually causes a much slower DOS video output due to
  833.      the need of the driver to check the output stream for interpretable
  834.      sequences, COMPTEST states if the speed shown refers to the output
  835.      speed with or without an ANSI driver present. To check for an ANSI
  836.      driver, COMPTEST prints an ANSI ESC sequence that causes an ANSI
  837.      driver to report the cursor position by inserting the result string
  838.      into the keyboard buffer. COMPTEST then checks if this information
  839.      has arrived in the keyboard buffer and assumes the presence of an
  840.      ANSI device driver if it finds the info in the keyboard buffer. Besides
  841.      the use of an ANSI or similar terminal driver (e.g. EANSI, NANSI),
  842.      the use of a 386 memory manager such a 386MAX, QEMM, or EMM386 can
  843.      slow down DOS video thruput as the use of these programs causes a
  844.      higher overhead in the interrupt calls used in the code that prints
  845.      to the screen.
  846.  
  847.  
  848. o    DOS version:
  849.      Shows the DOS version as reported by a call to the DOSGetVersion
  850.      function of MS-DOS. For version 5.0 or later, this may not be
  851.      the true DOS version, since the DOS version number reported to
  852.      an application can be manipulated using the SETVER utility of DOS.
  853.  
  854.  
  855. o    Standard benchmarks:
  856.      COMPTEST uses three widely known standard benchmarks to provide some
  857.      measurements of system performance. Since results for these benchmarks
  858.      depend not only on the speed of the hardware, but also on the code
  859.      quality of the compiler, only the relative performance to the original
  860.      IBM PC displayed by COMPTEST is really significant. The reference
  861.      numbers used in COMPTEST were determined using my own fast replacement
  862.      for Turbo Pascal 6.0's run-time library (available as TPL60N15.ZIP
  863.      from garbo.uwasa.fi and additional ftp sites). The compiler switch
  864.      settings were the same as those found in the source code of COMPTEST
  865.      2.57. If you use another compiler, e.g. Stony Brook Pascal+, which is
  866.      an optimizing compiler mostly compatible with TP 6.0, or use other
  867.      switch settings, you *must* determine new reference values for the
  868.      IBM PC if the PC relative performance numbers are to be of any use.
  869.  
  870.  
  871. o    Dhrystones:
  872.      The results of running the Dhrystone benchmark, a synthetic benchmark
  873.      that is supposedly representative of integer applications. Note that
  874.      Dhrystone performance depends on the hardware as much as on the
  875.      compiler. Therefore, Dhrystone numbers by other system test programs
  876.      may be higher or lower as those reported by COMPTEST, depending on
  877.      wether or not they were compiled with an optimizing compiler or run
  878.      as a 16-bit or a 32-bit programm. There are different versions of
  879.      Dhrystone, the version used here (2.1) is the latest available from
  880.      the author of the benchmark, Reinhold Weicker. The Dhrystone code
  881.      fits well into a rather small cache (8 kB will be sufficient), so
  882.      for systems with CPU caches it tests only CPU performance, *not*
  883.      the performance of the memory system. To make the Dhrystone performance
  884.      as determined by COMPTEST useful, the relative performance as
  885.      compared to the original IBM-PC is given.
  886.  
  887.  
  888. o    Whetstones:
  889.      The results of running the Whetstone benchmark, a synthetic benchmark
  890.      that stresses mainly floating point performance, including trans-
  891.      cendental functions like Sin or Exp. As the Dhrystone numbers, the
  892.      results of the Whetstone benchmark depend as much on the hardware
  893.      as on the code quality of the compiler (wether optimizing or not),
  894.      although the compiler dependency is usually somewhat less than with
  895.      the Dhrystone benchmark. Therefore, Whetstone numbers as determined
  896.      by COMPTEST should not be compared to those determined by other programs.
  897.      To make Whetstone results useful, the performance is also rated in
  898.      comparison with the original IBM-PC. Note that the test uses software
  899.      emulation of the coprocessor if the machine tested does not have
  900.      an 80x87 mathematical coprocessor, and that in this case the performance
  901.      is compared to the equivalent PC configuration, that is a PC without
  902.      an 8087. There are two versions of the Whetstone benchmark, an older
  903.      version derived from the original article published in 1976 and a newer
  904.      version that includes sanity checks. The latest available version
  905.      aquired from one of the original authors (Brian Wichmann) is used here.
  906.  
  907.  
  908. o    MFLOPS:
  909.      This benchmark result tells you how many millions of basic floating
  910.      point operations (add, subtract, multiply) the tested machine is able
  911.      to execute per second. This number is determinded by running an older
  912.      version of the Lawrence Livermoore Loops, a set of 14 kernels taken
  913.      from *real* number crunching programs and computing the average MFLOPS
  914.      (Millions of FLoating-point OPerations per Second). There is a newer
  915.      suite of LLL out that uses 24 kernels and provides more detailed
  916.      diagnostics of the floating point performance. Due to its size, it
  917.      could not easily be integrated into COMPTEST, so the older (and simpler)
  918.      version was used. The LLL benchmark uses about 60 kB of RAM, so results
  919.      may be influenced by the size of the CPU cache, if any is installed.
  920.      For reference, the MFLOPS are compared to the performance of an IBM-PC
  921.      with 8087 (if the tested machine also has a coprocessor) or to a plain
  922.      IBM-PC using the software emulator (if the machine tested does *not*
  923.      have a coprocessor). As with the other benchmarks, the LLL performance
  924.      depends not only on the hardware, but also on the compiler used. Highly
  925.      optimizing compilers that make use of 32-bit instructions where possible
  926.      would give an MFLOPS rating that is about 50% higher.
  927.  
  928.  
  929. o    Harddisk data:
  930.      COMPTEST usually is able to test all harddisks in your system, regard-
  931.      less of wether they use the ST506, IDE, ESDI, or SCSI interface. How-
  932.      ever, it may fail to detect some special types of hard disks like the
  933.      removeable data packs found on some Tandon computers that use special
  934.      drivers to hook into the DOS file system.
  935.  
  936.  
  937. o    Harddisk geometry (# cylinders, # read/write heads, sectors per track):
  938.      These disk parameters are given as reported by the BIOS. The parameters
  939.      given may not reflect the physical geometry of the disk. For example,
  940.      if a disks uses the zone bit recording technique, there is no
  941.      fixed ratio of sectors per track, rather the number of sectors per
  942.      track is greater in the outer zones and smaller in the inner zones.
  943.      So the parameters given reflect the logical layout of the disk as
  944.      seen by the BIOS, which may or may not coincide with the physical
  945.      layout of the disk.
  946.  
  947.  
  948. o    Harddisk storage capacity:
  949.      The *formatted* capacity of the disk is given in bytes and MB. Note
  950.      that a MB contains 1024x1024 = 1,048,576 bytes if computed correctly.
  951.      Some disk manufacturers (e.g. Quantum) state the storage capacity in
  952.      MBs consisting of only 1,000,000 bytes. Therefore, the capacity in MB
  953.      as reported by COMPTEST may be lower than the capacity the manufacturer
  954.      claims for the disk. Also, the capacity you can use using DOS may be
  955.      even smaller, since DOS allocates some disk memory to build allocation
  956.      structures like partition tables or FATs.
  957.  
  958.  
  959. o    Track-to-track seek time:
  960.      The time it takes to move the read/write heads of your hard disks
  961.      from one cylinder to an adjacent cylinder. The time reported may
  962.      be zero when using certain disk cache programs (e.g. HyperDisk),
  963.      as these suppress unnecessary head movements if no data is read
  964.      or written in the process (as happens when COMPTEST does this
  965.      test). Also, COMPTEST may be fooled by the so called translation
  966.      modes mainly used by certain hard disks using the IDE interface
  967.      to overcome limitations to the maximum number of cylinders set
  968.      by the BIOS or to accommodate the fixed sectors/track scheme of
  969.      PCs to the modern zone bit recording technique. With translation
  970.      mode enabled, two logical tracks can reside on the same physical
  971.      track, essentialy nullifying the time to move between the logical
  972.      tracks. COMPTEST moves the read/write heads over all tracks in single
  973.      track steps and divides the total time by the number of tracks moved.
  974.      This provides an average time, since movements between adjacent tracks
  975.      may take different times depending on the absolute loaction of the
  976.      tracks.
  977.  
  978.  
  979. o    Average seek time:
  980.      The time needed on the *average* to position the read/write heads
  981.      over an abitrarily selected cylinder on the disk. This time is
  982.      roughly equal to the time it takes the heads to travel over one
  983.      third the total numbers of tracks. It can be shown that, if tracks
  984.      are selected at random from a uniform distribution on [0..MaxTrack]
  985.      the average difference between any pair of track numbers is equal
  986.      to one third the total numbers of tracks. Note however, that the
  987.      assumption of a uniform distribution in track access patterns
  988.      usually does *not* hold for practical file systems. Also, the
  989.      average number of tracks travelled by read/write heads varies
  990.      for the different zones of a disk using zone bit recording or
  991.      using read/write queuing. For most disks however, the number
  992.      reported by COMPTEST should be close to the number stated by the
  993.      disk's manufacturer. When using certain disk cache programs, you
  994.      will see very small times due to the fact that these programs
  995.      suppress all unnecessary head movements. Note also that the
  996.      average access time by definition is not equal to the tine needed
  997.      on the average to access a specific sector on the disk. For this
  998.      you have to add at least the rotational latency (the time needed
  999.      until the read/write head reaches the designated sector on the
  1000.      track after having moved to the correct cylinder). This takes
  1001.      half of the time required for a full revolution of the disk in the
  1002.      average case, that is 8 ms for a disk spinning at 3600 rpm. Newer
  1003.      disks often spin at a higher speed of 4400 rpm or more to reduce
  1004.      rotational latency.
  1005.  
  1006.  
  1007. o    maximum thruput:
  1008.      COMPTEST determines the maximum thruput of a disk similar to the
  1009.      well known CORETEST disk test program by repeatedly reading the
  1010.      same block from disk. It uses the low level functions provided by
  1011.      the BIOS to maximize performance. The amount of data read is the
  1012.      data on one cylinder or 63 kBytes, whichever is smaller. Therefore,
  1013.      no movement of the read/write heads occurs during the read test.
  1014.      The disk's read thruput is determined for the first and the last
  1015.      cylinder on the disk. For hard disks using the zone bit recording
  1016.      technique, the thruput on the outermost cylider can be about 50%
  1017.      higher than on the innermost cylinder, since more data is recorded
  1018.      on the outer cylinders. Since COMPTEST reports the maximum thruput,
  1019.      it always reports the higher of the two transfer rates it determines.
  1020.      The transfer rate in real applications is usually much lower than
  1021.      the maximum transfer rate reported by COMPTEST. By repeatedly reading
  1022.      the same block from disk, COMPTEST causes the block to be read into
  1023.      the track buffers and on-disk hardware caches present on most modern
  1024.      disks or the cache memory of a caching controller. If the block fits
  1025.      completely into such a cache, the transfer rate measured is actually
  1026.      the transfer rate between the buffer/cache and the system memory. A
  1027.      more realistic transfer rate could be determined by completely reading
  1028.      the data on several adjacent tracks. Since every data item is read
  1029.      only once, a cache will not inflate the transfer rate. The transfer
  1030.      rate determined by this process is called the linear read rate. It
  1031.      is used to measure disk performance in programs such as PCTOOLS 7.1's
  1032.      SI. The linear read rate can be useful to determine disk performance
  1033.      for operations on large files that are contigous and are read
  1034.      sequentially with only a small amount of head movement. Many applications
  1035.      use random access files, though, and files may not be stored in
  1036.      contigous form on the disk. In these circumstances, there is a
  1037.      considerable amount of head movement and the seek time and rotational
  1038.      latency cause overhead that further reduces the effective transfer
  1039.      rate available to applications. Note that COMPTEST uses the BIOS to
  1040.      access the disk, while applications make use of an operating system's
  1041.      file system that introduces additional overhead. Also, write access
  1042.      to a disk may be significantly slower than read accesses. Hardware
  1043.      caches on the disk or on the disk controller and software caches
  1044.      like HYPERDISK and SMARTDRV can provide better disk performance
  1045.      by storing frequently used data in cache memory that can be accessed
  1046.      faster than the disk itself. COMPTEST tries to determine the presence
  1047.      of a disk cache by repeatedly reading a small amount of data from
  1048.      different (non-adjacent) tracks. If no cache is present, the head
  1049.      movement to access the different tracks is the reason that the read
  1050.      time can not fall below a certain level due to the physical limits
  1051.      that prevent a reduction in average seek times below about 12 ms.
  1052.      If a cache is present, all data can be hold in the cache memory
  1053.      after the first read access and no additional head movements take
  1054.      place, thereby causing fast execution of COMPTEST's test to determine
  1055.      presence of a disk cache. COMPTEST does not differentiate between
  1056.      hardware and software caches.
  1057.